#include "stdafx.h"
#include "CityInfo.h"
#include "City.h"
#include "inputmanager.h"

using namespace MyGUI;

namespace sgGUI
{

	CityInfo::CityInfo(MyGUI::Widget* _parent)
	{
		initialiseByAttributes(this, _parent);
	}

	CityInfo::~CityInfo()
	{
	}

    void CityInfo::SetCity( sgCity *city )
    {
        CityEntry &entry = city->GetEntry();
        UString str;
        str = entry.name;
        mEditEditBox->setCaption( str );
        const InputInfo &info = CInputManager::Instance().GetInputInfo();
        mRootWidget->setPosition(info.GameMouse.x, info.GameMouse.y);
    }

} // sgGUI
